900
|
How do I get ride of the separator items when the user performs grouping

METHOD OCX_Exontrol1AddGroupItem(Item) CLASS MainDialog
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
oDCOCX_Exontrol1:Items:[ItemDividerLine,Item] := EmptyLine
RETURN NIL
local rs as _Recordset
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:SortBarVisible := true
oDCOCX_Exontrol1:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
oDCOCX_Exontrol1:AllowGroupBy := true
oDCOCX_Exontrol1:Columns:[Item,1]:SortOrder := SortAscending
oDCOCX_Exontrol1:LinesAtRoot := exGroupLinesOutside
oDCOCX_Exontrol1:EndUpdate()
|
899
|
How do I split a cell in three parts, and having a radio button in each of them

METHOD OCX_Exontrol1CellStateChanged(Item,ColIndex) CLASS MainDialog
// CellStateChanged event - Fired after cell's state has been changed.
OutputDebugString(String2Psz( oDCOCX_Exontrol1:Items:[CellCaption,Item,ColIndex] ))
RETURN NIL
METHOD OCX_Exontrol1Click() CLASS MainDialog
// Click event - Occurs when the user presses and then releases the left mouse button over the grid control.
local h as USUAL
h := oDCOCX_Exontrol1:[ItemFromPoint,-1,-1,c,hit]
oDCOCX_Exontrol1:Items:[CellState,h,c] := 1
RETURN NIL
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:FullRowSelect := exColumnSel
oDCOCX_Exontrol1:SelBackColor := oDCOCX_Exontrol1:BackColor
oDCOCX_Exontrol1:SelForeColor := oDCOCX_Exontrol1:ForeColor
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:ShowFocusRect := false
IColumn{oDCOCX_Exontrol1:Columns:Add("Default")}:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("entire")
h := var_Items:AddItem("Radio <b>1")
var_Items:[CellRadioGroup,h,0] := 100
var_Items:[CellHasRadioButton,h,0] := true
var_Items:[CellState,h,0] := 1
h := var_Items:[SplitCell,h,0]
var_Items:[CellValue,0,h] := "Radio <b>2"
var_Items:[CellRadioGroup,0,h] := 100
var_Items:[CellHasRadioButton,0,h] := true
h := var_Items:[SplitCell,0,h]
var_Items:[CellValue,0,h] := "Radio <b>3"
var_Items:[CellRadioGroup,0,h] := 100
var_Items:[CellHasRadioButton,0,h] := true
h := var_Items:AddItem("entire")
oDCOCX_Exontrol1:EndUpdate()
|
898
|
Does your grid include a row indicator , like an arrow, bullet

METHOD OCX_Exontrol1SelectionChanged() CLASS MainDialog
// SelectionChanged event - Fired after a new item has been selected.
local var_Items as IItems
local hFocusItem as USUAL
var_Items := oDCOCX_Exontrol1:Items
hFocusItem := var_Items:FocusItem
var_Items:[CellValue,oDCOCX_Exontrol1:Columns:[Item,"active"]:Data,"active"] := ""
var_Items:[CellValue,hFocusItem,"active"] := "<c><font symbol>·"
var_Items:[CellVAlignment,hFocusItem,"active"] := exBottom
oDCOCX_Exontrol1:Columns:[Item,"active"]:Data := hFocusItem
RETURN NIL
local var_Column as IColumn
local var_Items as IItems
local rs as _Recordset
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:ShowFocusRect := false
oDCOCX_Exontrol1:ContinueColumnScroll := true
oDCOCX_Exontrol1:ScrollBySingleLine := true
oDCOCX_Exontrol1:AutoDrag := exAutoDragScrollOnShortTouch | exAutoDragScroll
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("")}
var_Column:Key := "active"
var_Column:Position := 0
var_Column:AllowSizing := false
var_Column:Width := 12
var_Column:Data := oDCOCX_Exontrol1:Items:FocusItem
var_Column:[Def,exCellValueFormat] := 1
oDCOCX_Exontrol1:CountLockedColumns := 1
var_Items := oDCOCX_Exontrol1:Items
var_Items:[SelectItem,var_Items:[NextVisibleItem,var_Items:FocusItem]] := true
oDCOCX_Exontrol1:EndUpdate()
|
897
|
How can I connect to a DBF file
local rs as _Recordset
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:ContinueColumnScroll := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADODB.Recordset"}
rs:Open("Select * From foxcode.DBF","Provider=vfpoledb;Data Source=C:\Program Files\Microsoft Visual FoxPro 9\",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
|
896
|
Does your control supports scrolling by touching the screen

local rs as _Recordset
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:ContinueColumnScroll := true
oDCOCX_Exontrol1:ScrollBySingleLine := true
oDCOCX_Exontrol1:AutoDrag := exAutoDragScrollOnShortTouch | exAutoDragScroll
|
895
|
How do I prevent showing the control's BackColorAlternate property on empty / non-items part of the control

local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:BackColorAlternate := 0x7ff0f0f0
oDCOCX_Exontrol1:Columns:Add("Column")
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("Item 1")
var_Items:AddItem("Item 2")
var_Items:AddItem("Item 3")
var_Items:AddItem("Item 4")
var_Items:AddItem("Item 5")
oDCOCX_Exontrol1:EndUpdate()
|
894
|
Is there any method for reading information from the root item for the current item...

local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:SearchColumnIndex := 0
oDCOCX_Exontrol1:Columns:Add("Info")
var_Items := oDCOCX_Exontrol1:Items
var_Items:PathSeparator := " ; "
var_Items:[SelectItem,var_Items:InsertItem(var_Items:InsertItem(var_Items:InsertItem(var_Items:InsertItem(nil,nil,"Root"),nil,"Child"),nil,"Sub-Child"),nil,"Sub-Sub-Child")] := true
var_Items:[ExpandItem,0] := true
OutputDebugString(String2Psz( var_Items:[FullPath,var_Items:FocusItem] ))
oDCOCX_Exontrol1:EndUpdate()
|
893
|
How can I highlight items with a specified date

local var_Column as IColumn
local var_Columns as IColumns
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Tasks")
var_Column := IColumn{var_Columns:Add("Date")}
var_Column:SortType := SortDate
var_Column:Editor:EditType := SpinType
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellValue,var_Items:AddItem("Task 1"),1] := SToD("20011213")
var_Items:[CellValue,var_Items:AddItem("Task 2"),1] := SToD("20011214")
var_Items:[CellValue,var_Items:AddItem("Task 2"),1] := SToD("20011215")
oDCOCX_Exontrol1:ConditionalFormats:Add("%1 = #12/14/2001#",nil):Bold := true
oDCOCX_Exontrol1:EndUpdate()
|
892
|
Today date is shown, if we use the Column.FormatColumn and Editor.Option(exDateAllowNullDate) properties. What can be done

local var_Column as IColumn
local var_Editor as IEditor
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Date")}
var_Column:FormatColumn := "len(value) ? ( (longdate(date(value)) left 3) + ' ' + day(date(value)) + '/' + month(date(value)) + '/' + (year(date(value)) right 2) ) : '' )"
var_Editor := var_Column:Editor
var_Editor:EditType := DateType
var_Editor:[Option,exDateAllowNullDate] := true
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(SToD("20120512"))
var_Items:AddItem(nil)
var_Items:AddItem(SToD("20120514"))
oDCOCX_Exontrol1:EndUpdate()
|
891
|
How can I add multiple values/columns on the same line/item/row

METHOD OCX_Exontrol1Change(Item,ColIndex,NewValue) CLASS MainDialog
// Change event - Occurs when the user changes the cell's content.
oDCOCX_Exontrol1:Refresh()
RETURN NIL
local var_Columns as IColumns
local var_Items as IItems
local h,h1 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SortOnClick := exNoSort
oDCOCX_Exontrol1:LinesAtRoot := exGroupLinesOutside
oDCOCX_Exontrol1:Indent := 13
oDCOCX_Exontrol1:HeaderVisible := false
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Items")
IColumn{var_Columns:Add("Quantity")}:Editor:EditType := SpinType
IColumn{var_Columns:Add("Value")}:Editor:EditType := SpinType
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Items")
var_Items:[CellValue,h,2] := "sum(current,dir,dbl(%1)*dbl(%2))"
var_Items:[CellValueFormat,h,2] := exTotalField
var_Items:[FormatCell,h,2] := "`Total: `+ value"
var_Items:[CellHAlignment,h,2] := RightAlignment
var_Items:[CellBold,h,2] := true
var_Items:[CellEditorVisible,h,2] := exEditorHidden
var_Items:[CellEditorVisible,h,1] := exEditorHidden
h1 := var_Items:InsertItem(h,nil,"Item 1")
var_Items:[CellValue,h1,1] := 10
var_Items:[CellValue,h1,2] := 3
h1 := var_Items:InsertItem(h,nil,"Item 2")
var_Items:[CellValue,h1,1] := 20
var_Items:[CellValue,h1,2] := 4
var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()
|
890
|
Is there a syntax for conditional formatting of items, based on CellState/CellStateChange

METHOD OCX_Exontrol1CellStateChanged(Item,ColIndex) CLASS MainDialog
// CellStateChanged event - Fired after cell's state has been changed.
local var_Items as IItems
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellValue,Item,2] := var_Items:[CellState,Item,0]
RETURN NIL
local var_Column as IColumn
local var_ConditionalFormat as IConditionalFormat
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ShowFocusRect := false
oDCOCX_Exontrol1:SelBackMode := exTransparent
var_ConditionalFormat := oDCOCX_Exontrol1:ConditionalFormats:Add("%2 != 0",nil)
var_ConditionalFormat:Bold := true
var_ConditionalFormat:ForeColor := RGB(255,0,0)
var_ConditionalFormat:ApplyTo := exFormatToItems
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("")}
var_Column:[Def,exCellHasCheckBox] := true
var_Column:Width := 16
var_Column:AllowSizing := false
oDCOCX_Exontrol1:Columns:Add("Information")
IColumn{oDCOCX_Exontrol1:Columns:Add("Hidden")}:Visible := false
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellValue,var_Items:AddItem(""),1] := "This is a bit of text associated"
h := var_Items:AddItem("")
var_Items:[CellValue,h,1] := "This is a bit of text associated"
var_Items:[CellState,h,0] := 1
var_Items:[CellValue,var_Items:AddItem(""),1] := "This is a bit of text associated"
oDCOCX_Exontrol1:EndUpdate()
|
889
|
How do I programatically focus a cell

METHOD OCX_Exontrol1FocusChanged() CLASS MainDialog
// FocusChanged event - Occurs when a new cell is focused.
local var_Items as IItems
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellBackColor,var_Items:FocusItem,oDCOCX_Exontrol1:FocusColumnIndex] := RGB(255,0,0)
RETURN NIL
local var_Columns as IColumns
local var_Items,var_Items1 as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SelForeColor := oDCOCX_Exontrol1:ForeColor
oDCOCX_Exontrol1:SelBackColor := oDCOCX_Exontrol1:BackColor
oDCOCX_Exontrol1:DrawGridLines := exRowLines
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Column1")
var_Columns:Add("Column2")
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellValue,var_Items:AddItem("Cell 1.1"),1] := "Cell 1.2"
var_Items:[CellValue,var_Items:AddItem("Cell 2.1"),1] := "Cell 2.2"
var_Items1 := oDCOCX_Exontrol1:Items
var_Items1:[SelectItem,var_Items1:[ItemByIndex,1]] := true
oDCOCX_Exontrol1:FocusColumnIndex := 1
oDCOCX_Exontrol1:EndUpdate()
|
888
|
How do I programatically focus a cell (excrd)

METHOD OCX_Exontrol1FocusChanged() CLASS MainDialog
// FocusChanged event - Occurs when a new cell is focused.
local var_Items as IItems
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellBackColor,var_Items:FocusItem,oDCOCX_Exontrol1:FocusColumnIndex] := RGB(255,0,0)
RETURN NIL
local var_Column as IColumn
local var_Columns as IColumns
local var_Items,var_Items1 as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SelForeColor := oDCOCX_Exontrol1:ForeColor
oDCOCX_Exontrol1:SelBackColor := oDCOCX_Exontrol1:BackColor
oDCOCX_Exontrol1:DrawGridLines := exRowLines
oDCOCX_Exontrol1:DefaultItemHeight := 36
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Column1")}:Visible := false
IColumn{var_Columns:Add("Column2")}:Visible := false
IColumn{var_Columns:Add("Column3")}:Visible := false
var_Column := IColumn{var_Columns:Add("FormatLevel")}
var_Column:FormatLevel := "(0/1),2"
var_Column:[Def,exCellFormatLevel] := var_Column:FormatLevel
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Cell 1.1")
var_Items:[CellValue,h,1] := "Cell 1.2"
var_Items:[CellValue,h,2] := "Cell 1.3"
h := var_Items:AddItem("Cell 2.1")
var_Items:[CellValue,h,1] := "Cell 2.2"
var_Items:[CellValue,h,2] := "Cell 2.3"
var_Items1 := oDCOCX_Exontrol1:Items
var_Items1:[SelectItem,var_Items1:[ItemByIndex,1]] := true
oDCOCX_Exontrol1:FocusColumnIndex := 2
oDCOCX_Exontrol1:EndUpdate()
|
887
|
How do I programmatically exclude items from the filter

local var_Column,var_Column1 as IColumn
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Items")}
var_Column:DisplayFilterButton := true
var_Column:DisplayFilterPattern := false
var_Column:FilterList := exShowExclude | exShowFocusItem | exShowCheckBox
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("Item 1")
var_Items:AddItem("Item 2")
var_Items:AddItem("Item 3")
var_Items:AddItem("Item 4")
var_Column1 := oDCOCX_Exontrol1:Columns:[Item,0]
var_Column1:FilterType := exFilterExclude | exFilter
var_Column1:Filter := "Item 1|Item 4"
oDCOCX_Exontrol1:ApplyFilter()
oDCOCX_Exontrol1:EndUpdate()
|
886
|
Using the property Column.FormatColumn I want to display numbers in the numeric format with no decimals - unless the value is NULL then I want to display a blank or empty

local var_Columns as IColumns
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Format")}:FormatColumn := "len(value) ? (value format '0') : '' "
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(10)
var_Items:AddItem(nil)
var_Items:AddItem(-8)
oDCOCX_Exontrol1:EndUpdate()
|
885
|
How can I change the drop down filter background color

local var_Column as IColumn
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:[Background,exBackColorFilter] := RGB(255,255,255)
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Items")}
var_Column:DisplayFilterButton := true
var_Column:DisplayFilterPattern := false
var_Column:FilterList := exShowFocusItem | exShowCheckBox | exSortItemsAsc | exLeafItems
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Root 1")
var_Items:InsertItem(h,nil,"Child 1")
var_Items:InsertItem(h,nil,"Child 2")
var_Items:[ExpandItem,h] := true
h := var_Items:AddItem("Root 2")
var_Items:InsertItem(h,nil,"Child 1")
var_Items:InsertItem(h,nil,"Child 2")
var_Items:InsertItem(h,nil,"Child 3")
var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()
|
884
|
I am using AllowGroupBy property and calling the Column.SortOrder property groups by that column. Is it possible to prevent that, so I have a similar behavior like I click the column's header rather than dragging it to the control's GroupBy bar

local var_Columns as IColumns
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("First")
var_Columns:Add("Second")
var_Columns:Add("Third")
oDCOCX_Exontrol1:SortBarVisible := true
oDCOCX_Exontrol1:SingleSort := false
oDCOCX_Exontrol1:AllowGroupBy := true
oDCOCX_Exontrol1:Layout := "SingleSort = " + CHR(34) + "C0:1" + CHR(34) + ";MultipleSort = " + CHR(34) + "C1:2 C2:1" + CHR(34) + ""
|
883
|
Calling programatically the Column.SortOrder property adds the column to the sort bar. Is it possible to prevent that, so I have a similar behavior like I click the column's header rather than dragging it to the control's Sort bar

local var_Columns as IColumns
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("First")
var_Columns:Add("Second")
var_Columns:Add("Third")
oDCOCX_Exontrol1:SortBarVisible := true
oDCOCX_Exontrol1:SingleSort := false
oDCOCX_Exontrol1:Layout := "SingleSort = " + CHR(34) + "C0:1" + CHR(34) + ""
|
882
|
How do I restore/clear the HotBackColor/HotForeColor properties

local var_Column,var_Column1 as IColumn
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:HotBackColor := RGB(0,0,255)
oDCOCX_Exontrol1:HotForeColor := RGB(255,255,255)
IColumn{oDCOCX_Exontrol1:Columns:Add("Value")}:Visible := false
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("USD")}
var_Column:[Def,exCellValueFormat] := 1
var_Column:FormatColumn := "len(%0) ? ((0:=dbl(%0)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + `USD `+ (=:0 format ``)"
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("EUR")}
var_Column1:[Def,exCellValueFormat] := 1
var_Column1:FormatColumn := "len(%0) ? ((0:=0.72*dbl(%0)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + `EUR `+ (=:0 format ``)"
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("1.23")
var_Items:AddItem("2.34")
var_Items:AddItem("9.94")
var_Items:AddItem("11.94")
var_Items:AddItem("1000")
oDCOCX_Exontrol1:HotBackColor := oDCOCX_Exontrol1:BackColor
oDCOCX_Exontrol1:HotForeColor := oDCOCX_Exontrol1:ForeColor
oDCOCX_Exontrol1:EndUpdate()
|
881
|
How do I format a column using a currency, and another column to another currency

local var_Column,var_Column1 as IColumn
local var_Items as IItems
IColumn{oDCOCX_Exontrol1:Columns:Add("Value")}:Visible := false
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("USD")}
var_Column:[Def,exCellValueFormat] := 1
var_Column:FormatColumn := "len(%0) ? ((0:=dbl(%0)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + `USD `+ (=:0 format ``)"
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("EUR")}
var_Column1:[Def,exCellValueFormat] := 1
var_Column1:FormatColumn := "len(%0) ? ((0:=0.72*dbl(%0)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + `EUR `+ (=:0 format ``)"
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("1.23")
var_Items:AddItem("2.34")
var_Items:AddItem("9.94")
var_Items:AddItem("11.94")
var_Items:AddItem("1000")
|
880
|
How can I sort the columns to be displayed on the columns floating bar

local var_Columns as IColumns
oDCOCX_Exontrol1:ColumnAutoResize := false
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("City")}:Visible := false
IColumn{var_Columns:Add("Start")}:Visible := false
IColumn{var_Columns:Add("End")}:Visible := false
oDCOCX_Exontrol1:ColumnsFloatBarVisible := exColumnsFloatBarVisibleIncludeHiddenColumns
oDCOCX_Exontrol1:ColumnsFloatBarSortOrder := SortAscending
|
879
|
How can I get the column index and the row index of the active cell

METHOD OCX_Exontrol1FocusChanged() CLASS MainDialog
// FocusChanged event - Occurs when a new cell is focused.
local var_Items as IItems
OutputDebugString(String2Psz( "Active/Focus-Column:" ))
OutputDebugString(String2Psz( oDCOCX_Exontrol1:Columns:[Item,oDCOCX_Exontrol1:FocusColumnIndex]:Caption ))
var_Items := oDCOCX_Exontrol1:Items
OutputDebugString(String2Psz( "Active/Focus-Row/Item:" ))
OutputDebugString(String2Psz( var_Items:[CellCaption,var_Items:FocusItem,oDCOCX_Exontrol1:FocusColumnIndex] ))
RETURN NIL
local var_Columns as IColumns
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("C1")}:Editor:EditType := EditType
IColumn{var_Columns:Add("C2")}:Editor:EditType := EditType
IColumn{var_Columns:Add("C3")}:Editor:EditType := EditType
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem(1)
var_Items:[CellValue,h,1] := 2
var_Items:[CellValue,h,2] := 3
h := var_Items:AddItem(3)
var_Items:[CellValue,h,1] := 1
var_Items:[CellValue,h,2] := 2
oDCOCX_Exontrol1:EndUpdate()
|
878
|
How can I add a vertical padding

local var_Column as IColumn
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DrawGridLines := exAllLines
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Padding")}
var_Column:[Def,exCellHasCheckBox] := true
var_Column:[Def,exCellSingleLine] := false
var_Column:[Def,exCellPaddingLeft] := 6
var_Column:[Def,exCellPaddingRight] := 6
var_Column:[Def,exCellPaddingTop] := 6
var_Column:[Def,exCellPaddingBottom] := 6
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("padding")
var_Items:AddItem("padding")
oDCOCX_Exontrol1:EndUpdate()
|
877
|
How can I set item's height individually for every item in the control and also have line breaks in the item caption

local var_Column as IColumn
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BackColorAlternate := RGB(240,240,240)
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Lines")}
var_Column:[Def,exCellValueFormat] := 1
var_Column:[Def,exCellSingleLine] := false
oDCOCX_Exontrol1:ItemsAllowSizing := exResizeItem
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Line 1<br>Line 2")
var_Items:[ItemMinHeight,h] := 36
var_Items:[ItemHeight,h] := var_Items:[ItemMinHeight,h]
var_Items:[ItemMaxHeight,h] := var_Items:[ItemMinHeight,h]
h := var_Items:AddItem("Line 1<br>Line 2")
var_Items:[ItemMinHeight,h] := 48
var_Items:[ItemHeight,h] := var_Items:[ItemMinHeight,h]
var_Items:[ItemMaxHeight,h] := var_Items:[ItemMinHeight,h]
h := var_Items:AddItem("Line 1<br>Line 2")
var_Items:[ItemMinHeight,h] := 64
var_Items:[ItemHeight,h] := var_Items:[ItemMinHeight,h]
var_Items:[ItemMaxHeight,h] := var_Items:[ItemMinHeight,h]
|
876
|
The mouse-cursor is shown over the tooltip. Is it possible somehow resolve this (method 2)

METHOD OCX_Exontrol1MouseMove(Button,Shift,X,Y) CLASS MainDialog
// MouseMove event - Occurs when the user moves the mouse.
oDCOCX_Exontrol1:ShowToolTip("This is bit of text that's shown when the user hovers the cell","Column",0,"+16","+16")
RETURN NIL
local var_Items as IItems
oDCOCX_Exontrol1:Columns:Add("Column")
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("tooltip")
|
875
|
The mouse-cursor is shown over the tooltip. Is it possible somehow resolve this (method 1)
METHOD OCX_Exontrol1ToolTip(Item,ColIndex,Visible,X,Y,CX,CY) CLASS MainDialog
// ToolTip event - Fired when the control prepares the object's tooltip.
X := 0
Y := 0
RETURN NIL
local var_Items as IItems
oDCOCX_Exontrol1:Columns:Add("Column")
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellToolTip,var_Items:AddItem("tooltip"),0] := "This is bit of text that's shown when the user hovers the cell"
|
874
|
How can I add a MIN or MAX field (for date)

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Text")}:SortType := SortDate
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(SToD("20010101"))
var_Items:AddItem(SToD("19981211"))
var_Items:AddItem(SToD("20140120"))
var_Items:AddItem(SToD("20130101"))
h := var_Items:AddItem("min(all,dir,date(%0))")
var_Items:[SortableItem,h] := false
var_Items:[CellValueFormat,h,0] := exTotalField
var_Items:[CellHAlignment,h,0] := RightAlignment
var_Items:[FormatCell,h,0] := "'MIN: '+value"
h := var_Items:AddItem("max(all,dir,date(%0))")
var_Items:[SortableItem,h] := false
var_Items:[CellValueFormat,h,0] := exTotalField
var_Items:[CellHAlignment,h,0] := RightAlignment
var_Items:[FormatCell,h,0] := "'MAX: '+value"
oDCOCX_Exontrol1:EndUpdate()
|
873
|
How can I add a MIN or MAX field (for text)

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Text")}:SortType := SortString
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("aha")
var_Items:AddItem("baba")
var_Items:AddItem("aaha")
var_Items:AddItem("aka")
h := var_Items:AddItem("min(all,dir,str(%0))")
var_Items:[SortableItem,h] := false
var_Items:[CellValueFormat,h,0] := exTotalField
var_Items:[CellHAlignment,h,0] := RightAlignment
var_Items:[FormatCell,h,0] := "'MIN: '+value"
h := var_Items:AddItem("max(all,dir,str(%0))")
var_Items:[SortableItem,h] := false
var_Items:[CellValueFormat,h,0] := exTotalField
var_Items:[CellHAlignment,h,0] := RightAlignment
var_Items:[FormatCell,h,0] := "'MAX: '+value"
oDCOCX_Exontrol1:EndUpdate()
|
872
|
How can I change the the focus rectangle

local var_Column as IColumn
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:VisualAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABeEGACAADACAxRDgMQBQKAAzQFAYbBlBaERiGQYIJhUAIIRZGMQxXAcMQvDSKQJhGDAADENAxAJCI4DBIgZQNDwZQIkCY4ZDKHIfRzNAASJIkTQPBKfYDGOLhSh6IJGRpPEIxdJMBr+fZ9QApeoYVj2J4eUCAFBxDRsZw8BiNAbkOi4Jp1f5nVJaFSxCKoSxbNqSBpGCzoJrKdI0R5JES2BAddTLBKzX7tHArLgSJ5dSrLMrwSKcRR1HSbIDyGaMUiCSqGVjWNZ5FREM46AAGbDgMILEgOZpoYDFVTZTKFCS7I6Eb40CCbCyPJQAabgWo4KAAZThNi7QAua4bTr7HqibLAexaJDOc4HVSgMLlIYEkIeg2iybAjDkfhMFuHY7mQT4xB0TBnFoUQ6i+cg2j2SIvHqVZIl8cB+BwTgPA4NRdjycg2FoHhuAMUZuHGUAwCECQUAaEYMHQHRHCGFRZEQAABO2AwRFCWQJAoGxECWTBHkGBxpg8RhYBMbJbD+TBzByfwwAwCIOCWCQiGiJgogqYh4hYIQ/k2cx9gEYQAAiRgqgsYx4mYLIOiOCMjjCTA4iScw8mMOQWEaEZkGkDgpguUIYm4SITmUCQaDuExjgkRhWhQJQ0A4ToVmWSQWFkAAljkdhiheZgZgoXIZCUWYaF2GgihmKhrg4JRJjYboVmaSIiHOHQnAkahph2ZYJmQAAxAwSQKESHwkFkKgoiAIxIHoPIimOOg2DiCgoiQJRQTYQxwn8MgMgoMoPiaYoaGCfw4A4CJNAkOpcGQBCAg==")
oDCOCX_Exontrol1:[Background,exShowFocusRect] := 0x1000000
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Check")}
var_Column:[Def,exCellPaddingLeft] := 2
var_Column:[Def,exCellHasCheckBox] := true
oDCOCX_Exontrol1:SelForeColor := oDCOCX_Exontrol1:ForeColor
oDCOCX_Exontrol1:SelBackColor := oDCOCX_Exontrol1:BackColor
oDCOCX_Exontrol1:DefaultItemHeight := 22
oDCOCX_Exontrol1:ShowFocusRect := true
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("")
var_Items:AddItem("")
oDCOCX_Exontrol1:EndUpdate()
|
871
|
Can each cell have their own dropdown lists that contain "different list item values" for each cell, not predefined for the entire column

local var_Editor,var_Editor1,var_Editor2,var_Editor3 as IEditor
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("Column/Cell-Same")}:Editor
var_Editor:EditType := DropDownListType
var_Editor:AddItem(0,"Zero",nil)
var_Editor:AddItem(1,"One",nil)
var_Editor:AddItem(2,"Two",nil)
var_Editor1 := IColumn{oDCOCX_Exontrol1:Columns:Add("Column/Cell-Different")}:Editor
var_Editor1:EditType := EditType
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(nil)
h := var_Items:AddItem(0)
var_Editor2 := var_Items:[CellEditor,h,1]
var_Editor2:EditType := DropDownListType
var_Editor2:AddItem(3,"Three",nil)
var_Editor2:AddItem(4,"Four",nil)
var_Items:[CellValue,h,1] := 3
var_Items:AddItem(nil)
h := var_Items:AddItem(0)
var_Editor3 := var_Items:[CellEditor,h,1]
var_Editor3:EditType := CheckListType
var_Editor3:AddItem(1,"Single",nil)
var_Editor3:AddItem(2,"Double",nil)
var_Items:[CellValue,h,1] := 3
oDCOCX_Exontrol1:EndUpdate()
|
870
|
How can I specify just a few fonts in a FontType editor

local var_Editor as IEditor
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DefaultItemHeight := 22
oDCOCX_Exontrol1:DrawGridLines := exRowLines
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("Fonts")}:Editor
var_Editor:EditType := FontType
var_Editor:ClearItems()
var_Editor:AddItem(0,"Calibri",nil)
var_Editor:AddItem(1,"Arial",nil)
var_Editor:AddItem(2,"Rockwell",nil)
var_Editor:AddItem(3,"Tahoma",nil)
var_Editor:SortItems(true,nil)
var_Editor:DropDownRows := 4
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("Tahoma")
oDCOCX_Exontrol1:EndUpdate()
|
869
|
How do you embed HTML options into the anchor click string

METHOD OCX_Exontrol1AnchorClick(AnchorID,Options) CLASS MainDialog
// AnchorClick event - Occurs when an anchor element is clicked.
OutputDebugString(String2Psz( AsString(AnchorID) ))
OutputDebugString(String2Psz( AsString(Options) ))
RETURN NIL
local var_Columns as IColumns
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Car")}:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("<a mazda_1;options for 1>Mazda <b>1</b></a>")
var_Items:AddItem("<a mazda_2;options for 2>Mazda <b>2</b></a>")
var_Items:AddItem("<a mazda_3;options for 3a>Mazda <b>3.a</b></a>")
var_Items:AddItem("<a mazda_3;options for 3b>Mazda <b>3.b</b></a>")
oDCOCX_Exontrol1:EndUpdate()
|
868
|
How do I add a checkbox column (method 2)

METHOD OCX_Exontrol1CellStateChanged(Item,ColIndex) CLASS MainDialog
// CellStateChanged event - Fired after cell's state has been changed.
OutputDebugString(String2Psz( "CheckBox Changed:" ))
OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:Items:[CellState,Item,ColIndex]) ))
RETURN NIL
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Check")}:[Def,exCellHasCheckBox] := true
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellState,var_Items:AddItem("Check 1"),0] := 0
var_Items:[CellState,var_Items:AddItem("Check 2"),0] := 1
var_Items:[CellState,var_Items:AddItem("Check 3"),0] := 0
var_Items:[CellState,var_Items:AddItem("Check 4"),0] := 1
oDCOCX_Exontrol1:EndUpdate()
|
867
|
How do I add a checkbox column (method 1)

METHOD OCX_Exontrol1Change(Item,ColIndex,NewValue) CLASS MainDialog
// Change event - Occurs when the user changes the cell's content.
OutputDebugString(String2Psz( "CheckBox Changed:" ))
OutputDebugString(String2Psz( AsString(NewValue) ))
RETURN NIL
local var_Column as IColumn
local var_Editor as IEditor
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Check")}
var_Editor := var_Column:Editor
var_Editor:EditType := CheckValueType
var_Editor:[Option,exCheckValue2] := 1
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(0)
var_Items:AddItem(1)
var_Items:AddItem(0)
var_Items:AddItem(1)
oDCOCX_Exontrol1:EndUpdate()
|
866
|
How do I change the progress bar's appearance

local var_Appearance as IAppearance
local var_Editor as IEditor
var_Appearance := oDCOCX_Exontrol1:VisualAppearance
var_Appearance:Add(1,"c:\exontrol\images\normal.ebn")
var_Appearance:Add(2,"c:\exontrol\images\pushed.ebn")
var_Editor := oDCOCX_Exontrol1:ColumnsIColumn{:Add("Progress")}:Editor
var_Editor:EditType := ProgressBarType
var_Editor:[Option,exProgressBarBackColor] := 16777216
var_Editor:[Option,exProgressBarMarkTicker] := 33554432
oDCOCX_Exontrol1:Items:AddItem(33)
|
865
|
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 3)

local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:VisualAppearance:Add(1,"gBFLBCJwBAEHhEJAEGg4BVEIQAAYAQGKIYBkAKBQAGaAoDDMOQwQwAAxjGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQCWIAzATGYBRfIUEgjBM6ExwG78egBHp/ZpkACIJJAaRjHQdJxGKKMQB9DIhCZpeKhWgkKIJBzOEyBRC4ERBGqNGrsIgLEqWZpnWhaNpWXYTLyBN64LhuK46g53O6wLxvK6hEr2dJ/YBcIAOfghf4NQ7EMRxLC8Mw3BDvYDkOAABAIgI=")
oDCOCX_Exontrol1:SelBackColor := 0x1fffffe
oDCOCX_Exontrol1:ShowFocusRect := false
oDCOCX_Exontrol1:Columns:Add("Items")
var_Items := oDCOCX_Exontrol1:Items
var_Items:[ItemBackColor,var_Items:AddItem("red")] := RGB(255,0,0)
var_Items:[ItemBackColor,var_Items:AddItem("blue")] := RGB(0,0,255)
var_Items:[ItemBackColor,var_Items:AddItem("green")] := RGB(0,255,0)
oDCOCX_Exontrol1:EndUpdate()
|
864
|
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 2)

local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SelBackMode := exTransparent
oDCOCX_Exontrol1:ShowFocusRect := false
oDCOCX_Exontrol1:Columns:Add("Items")
var_Items := oDCOCX_Exontrol1:Items
var_Items:[ItemBackColor,var_Items:AddItem("red")] := RGB(255,0,0)
var_Items:[ItemBackColor,var_Items:AddItem("blue")] := RGB(0,0,255)
var_Items:[ItemBackColor,var_Items:AddItem("green")] := RGB(0,255,0)
oDCOCX_Exontrol1:EndUpdate()
|
863
|
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 1)

local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SelBackColor := oDCOCX_Exontrol1:BackColor
oDCOCX_Exontrol1:SelForeColor := oDCOCX_Exontrol1:ForeColor
oDCOCX_Exontrol1:ShowFocusRect := true
oDCOCX_Exontrol1:Columns:Add("Items")
var_Items := oDCOCX_Exontrol1:Items
var_Items:[ItemBackColor,var_Items:AddItem("red")] := RGB(255,0,0)
var_Items:[ItemBackColor,var_Items:AddItem("blue")] := RGB(0,0,255)
var_Items:[ItemBackColor,var_Items:AddItem("green")] := RGB(0,255,0)
oDCOCX_Exontrol1:EndUpdate()
|
862
|
The BeforeExpandItem event is fired when clicking the drop down filter button. What we can do to prevent that

METHOD OCX_Exontrol1BeforeExpandItem(Item,Cancel) CLASS MainDialog
// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
OutputDebugString(String2Psz( "BeforeExpandItem" ))
OutputDebugString(String2Psz( AsString(Item) ))
oDCOCX_Exontrol1:Items:InsertItem(Item,nil,"new child")
RETURN NIL
local var_Column as IColumn
local var_Columns as IColumns
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
var_Columns := oDCOCX_Exontrol1:Columns
var_Column := IColumn{var_Columns:Add("Items")}
var_Column:DisplayFilterButton := true
var_Column:FilterList := exRootItems
var_Items := oDCOCX_Exontrol1:Items
var_Items:[ItemHasChildren,var_Items:InsertItem(nil,nil,"Group 1")] := true
var_Items:[ItemHasChildren,var_Items:InsertItem(nil,nil,"Group 2")] := true
oDCOCX_Exontrol1:EndUpdate()
|
861
|
How can I change the shape of the line to be shown when user drag and drop data over the control, EBN

METHOD OCX_Exontrol1OLEStartDrag(Data,AllowedEffects) CLASS MainDialog
// OLEStartDrag event - Occurs when the OLEDrag method is called.
// Data.SetData("data to be dragged")
RETURN NIL
local var_Items as IItems
oDCOCX_Exontrol1:OLEDropMode := exOLEDropManual
oDCOCX_Exontrol1:VisualAppearance:Add(1,"C:\Program Files\Exontrol\ExList\Sample\VB\DragDrop\insert_bottom.ebn")
oDCOCX_Exontrol1:[Background,exListOLEDropPosition] := 0x1000000
oDCOCX_Exontrol1:Columns:Add("Default")
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("Item 1")
var_Items:AddItem("Item 2")
|
860
|
How can I highlight the item from cursor when the user drag and drop data over the control

METHOD OCX_Exontrol1OLEStartDrag(Data,AllowedEffects) CLASS MainDialog
// OLEStartDrag event - Occurs when the OLEDrag method is called.
// Data.SetData("data to be dragged")
RETURN NIL
local var_Items as IItems
oDCOCX_Exontrol1:OLEDropMode := exOLEDropManual
oDCOCX_Exontrol1:[Background,exListOLEDropPosition] := RGB(1,0,0)
oDCOCX_Exontrol1:Columns:Add("Default")
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("Item 1")
var_Items:AddItem("Item 2")
|
859
|
Is it possible to always show the editor for all cells at all times

METHOD OCX_Exontrol1AddItem(Item) CLASS MainDialog
// AddItem event - Occurs after a new Item has been inserted to Items collection.
oDCOCX_Exontrol1:Items:[CellEditorVisible,Item,0] := exEditorVisible
oDCOCX_Exontrol1:Items:[CellEditorVisible,Item,1] := exEditorVisible
RETURN NIL
METHOD OCX_Exontrol1EditOpen() CLASS MainDialog
// EditOpen event - Occurs when the edit operation starts.
local var_Editor as IEditor
local var_Items as IItems
local c,v as USUAL
var_Items := oDCOCX_Exontrol1:Items
v := var_Items:[CellValue,var_Items:FocusItem,0]
c := var_Items:[CellCaption,var_Items:FocusItem,0]
var_Editor := oDCOCX_Exontrol1:Columns:[Item,1]:Editor
var_Editor:ClearItems()
var_Editor:AddItem(v,AsString(c),nil)
RETURN NIL
local var_Column as IColumn
local var_Editor as IEditor
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("DropDownList")}
var_Editor := var_Column:Editor
var_Editor:EditType := DropDownListType
var_Editor:AddItem(1,"First",nil)
var_Editor:AddItem(2,"Second",nil)
var_Editor:AddItem(3,"Third",nil)
oDCOCX_Exontrol1:DrawGridLines := exAllLines
IColumn{oDCOCX_Exontrol1:Columns:Add("DropDownList-Related")}:Editor:EditType := DropDownListType
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellValue,var_Items:AddItem(1),1] := -1
var_Items:[CellValue,var_Items:AddItem(2),1] := -1
var_Items:[CellValue,var_Items:AddItem(3),1] := -1
var_Items:[LockedItemCount,exBottom] := 1
h := var_Items:[LockedItem,exBottom,0]
var_Items:[ItemDivider,h] := 0
var_Items:[ItemDividerLineAlignment,h] := DividerTop
var_Items:[CellEditorVisible,h,0] := exEditorHidden
var_Items:[CellSingleLine,h,0] := exCaptionWordWrap
var_Items:[CellValueFormat,h,0] := exHTML
var_Items:[CellValue,h,0] := "The drop down editor in the second column is filled during the <b>EditOpen event</b>, and the values are based on the selection on the first column."
oDCOCX_Exontrol1:EndUpdate()
|
858
|
How do I set a computated cell individually

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Number")
oDCOCX_Exontrol1:Columns:Add("Format")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("1.23")
var_Items:[CellValueFormat,h,1] := exComputedField | exHTML
var_Items:[CellValue,h,1] := "2 * %0 + ` <font ;6><fgcolor=808080>(2 * Number)`"
h := var_Items:AddItem("1.23")
var_Items:[CellValueFormat,h,1] := exComputedField | exHTML
var_Items:[CellValue,h,1] := "3 * %0 + ` <font ;6><fgcolor=808080>(3 * Number)`"
h := var_Items:AddItem("1.23")
var_Items:[CellValueFormat,h,1] := exComputedField | exHTML
var_Items:[CellValue,h,1] := "currency(%0) + ` <font ;6><fgcolor=808080>( Currency(Number) )`"
oDCOCX_Exontrol1:EndUpdate()
|
857
|
Is it possible to assign a different editor for some cells

local var_Editor,var_Editor1,var_Editor2 as IEditor
local var_Items as IItems
local h as USUAL
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("Column - DropDownList")}:Editor
var_Editor:EditType := DropDownListType
var_Editor:AddItem(1,"First item",nil)
var_Editor:AddItem(2,"Second item",nil)
var_Editor:AddItem(3,"Third item",nil)
IColumn{oDCOCX_Exontrol1:Columns:Add("Cell - DropDownList")}:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem(1)
var_Editor1 := var_Items:[CellEditor,h,1]
var_Editor1:EditType := DropDownListType
var_Editor1:AddItem(1,"<b>First</b> item",nil)
var_Editor1:AddItem(2,"<b>Second</b> item",nil)
var_Editor1:AddItem(3,"<b>Third</b> item",nil)
var_Editor1:AddItem(4,"<b>Forth</b> item",nil)
var_Items:[CellValue,h,1] := 2
h := var_Items:AddItem(2)
var_Editor2 := var_Items:[CellEditor,h,1]
var_Editor2:EditType := DropDownListType
var_Editor2:AddItem(1,"<b>Aka First</b> item",nil)
var_Editor2:AddItem(2,"<b>Aka Second</b> item",nil)
var_Editor2:AddItem(3,"<b>Aka Third</b> item",nil)
var_Editor2:AddItem(4,"<b>Aka Forth</b> item",nil)
var_Items:[CellValue,h,1] := 2
|
856
|
Is it possible to define the keys of the drop down values to be strings rather than numeric values

METHOD OCX_Exontrol1Change(Item,ColIndex,NewValue) CLASS MainDialog
// Change event - Occurs when the user changes the cell's content.
OutputDebugString(String2Psz( "NewValue is" ))
OutputDebugString(String2Psz( AsString(NewValue) ))
RETURN NIL
local var_Editor,var_Editor1 as IEditor
local var_Items as IItems
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("DropDownList-String")}:Editor
var_Editor:EditType := DropDownListType
var_Editor:AddItem(1,"NYC|New York City",nil)
var_Editor:AddItem(2,"CJN|Cluj Napoca",nil)
var_Editor1 := IColumn{oDCOCX_Exontrol1:Columns:Add("DropDownList-Numeric")}:Editor
var_Editor1:EditType := DropDownListType
var_Editor1:AddItem(1,"New York City",nil)
var_Editor1:AddItem(2,"Cluj Napoca",nil)
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellValue,var_Items:AddItem("NYC"),1] := 2
|
855
|
The Change event gets me the today date. How can I find what user typed

METHOD OCX_Exontrol1Change(Item,ColIndex,NewValue) CLASS MainDialog
// Change event - Occurs when the user changes the cell's content.
OutputDebugString(String2Psz( "NewValue:" ))
OutputDebugString(String2Psz( AsString(NewValue) ))
OutputDebugString(String2Psz( "EditingValue:" ))
OutputDebugString(String2Psz( oDCOCX_Exontrol1:EditingText ))
RETURN NIL
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Edit")}:Editor:EditType := DateType
oDCOCX_Exontrol1:Items:AddItem(SToD("20010101"))
oDCOCX_Exontrol1:EndUpdate()
|
854
|
I have an edit field, when going to edit mode, the rightmost part is shown. Is it possible to show the left part instead

local var_Column as IColumn
local var_Editor as IEditor
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Edit")}
var_Column:Width := 64
var_Column:AllowSizing := false
var_Editor := var_Column:Editor
var_Editor:EditType := MaskType
var_Editor:Mask := ";;;rich"
oDCOCX_Exontrol1:Columns:Add("Empty")
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("This is a bit ot long text")
var_Items:AddItem("")
oDCOCX_Exontrol1:EndUpdate()
|
853
|
I have a drop down field, the control shows the rightmost part of the selected caption. Is it possible to show the left part

local var_Column,var_Column1 as IColumn
local var_Editor,var_Editor1,var_Editor2,var_Editor3 as IEditor
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("DropDown")}
var_Column:Width := 64
var_Column:AllowSizing := false
var_Editor := var_Column:Editor
var_Editor:DropDownAlignment := 0x20 |
var_Editor:EditType := DropDownType
var_Editor:AddItem(1,"First item. This is a bit ot long text",nil)
var_Editor:AddItem(2,"Second item. This is a bit ot long text",nil)
var_Editor:AddItem(3,"Third item. This is a bit ot long text",nil)
var_Editor:Mask := ";;;rich"
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("PickEdit")}
var_Column1:Width := 64
var_Column1:AllowSizing := false
var_Editor1 := var_Column1:Editor
var_Editor1:DropDownAlignment := 0x20 |
var_Editor1:EditType := PickEditType
var_Editor1:AddItem(1,"First item. This is a bit ot long text",nil)
var_Editor1:AddItem(2,"Second item. This is a bit ot long text",nil)
var_Editor1:AddItem(3,"Third item. This is a bit ot long text",nil)
var_Editor1:Mask := ";;;rich"
oDCOCX_Exontrol1:Columns:Add("Empty")
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellValue,var_Items:AddItem("First item. This is a bit ot long text"),1] := "Second item. This is a bit ot long text"
h := var_Items:AddItem("First item. This is a bit ot long text")
var_Editor2 := var_Items:[CellEditor,h,0]
var_Editor2:DropDownAlignment := 0x20 |
var_Editor2:EditType := DropDownType
var_Editor2:AddItem(1,"First item. This is a bit ot long text",nil)
var_Editor2:AddItem(2,"Second item. This is a bit ot long text",nil)
var_Editor2:AddItem(3,"Third item. This is a bit ot long text",nil)
var_Items:[CellValue,h,1] := "Second item. This is a bit ot long text"
var_Editor3 := var_Items:[CellEditor,h,1]
var_Editor3:DropDownAlignment := 0x20 |
var_Editor3:EditType := PickEditType
var_Editor3:AddItem(1,"First item. This is a bit ot long text",nil)
var_Editor3:AddItem(2,"Second item. This is a bit ot long text",nil)
var_Editor3:AddItem(3,"Third item. This is a bit ot long text",nil)
oDCOCX_Exontrol1:EndUpdate()
|
852
|
Is there a property for the back color of the dropdown field

local var_Editor as IEditor
oDCOCX_Exontrol1:BeginUpdate()
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("Date")}:Editor
var_Editor:EditType := DateType
var_Editor:[Option,exDropDownBackColor] := 15790320
var_Editor:[Option,exDropDownForeColor] := 65793
oDCOCX_Exontrol1:Items:AddItem(SToD("20010101"))
oDCOCX_Exontrol1:EndUpdate()
|
851
|
Is it possible to change a back color of the field/cell when it takes a focus

METHOD OCX_Exontrol1EditClose() CLASS MainDialog
// EditClose event - Occurs when the edit operation ends.
local var_Items as IItems
var_Items := oDCOCX_Exontrol1:Items
var_Items:ClearCellBackColor(var_Items:FocusItem,oDCOCX_Exontrol1:FocusColumnIndex)
RETURN NIL
METHOD OCX_Exontrol1EditOpen() CLASS MainDialog
// EditOpen event - Occurs when the edit operation starts.
local var_Items,var_Items1 as IItems
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellBackColor,var_Items:FocusItem,oDCOCX_Exontrol1:FocusColumnIndex] := RGB(255,0,0)
var_Items1 := oDCOCX_Exontrol1:Items
var_Items1:[CellValue,var_Items1:FocusItem,oDCOCX_Exontrol1:FocusColumnIndex] := oDCOCX_Exontrol1:Items:[CellValue,oDCOCX_Exontrol1:Items:FocusItem,oDCOCX_Exontrol1:FocusColumnIndex]
RETURN NIL
local var_Items as IItems
oDCOCX_Exontrol1:FullRowSelect := exColumnSel
IColumn{oDCOCX_Exontrol1:Columns:Add("C1")}:Editor:EditType := EditType
IColumn{oDCOCX_Exontrol1:Columns:Add("C2")}:Editor:EditType := EditType
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellValue,var_Items:AddItem("v1"),1] := "v2"
var_Items:[CellValue,var_Items:AddItem("v3"),1] := "v4"
|
850
|
How can I display the current date mask, but still allow empty values

local var_Editor as IEditor
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:CauseValidateValue := exValidateCell
oDCOCX_Exontrol1:FullRowSelect := exColumnSel
oDCOCX_Exontrol1:DrawGridLines := exRowLines
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("Date")}:Editor
var_Editor:EditType := DateType
var_Editor:Mask := "!99/99/9999;1;;empty=1,validateas=1,invalid=Invalid date\, for the input mask <br><b>'<%mask%>'</b>!,warning=Invalid character!,select=4,overtype"
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(nil)
var_Items:AddItem(SToD("20010101"))
var_Items:AddItem(nil)
oDCOCX_Exontrol1:EndUpdate()
|
849
|
How can I align the days in a DateType editor

local var_Editor,var_Editor1,var_Editor2,var_Editor3,var_Editor4,var_Editor5 as IEditor
local var_Items as IItems
oDCOCX_Exontrol1:Columns:Add("DropDown")
var_Items := oDCOCX_Exontrol1:Items
var_Editor := var_Items:[CellEditor,var_Items:AddItem(SToD("20010101")),0]
var_Editor:EditType := DateType
var_Editor:DropDownAlignment := RightAlignment
var_Editor1 := var_Items:[CellEditor,var_Items:AddItem(SToD("20010101")),0]
var_Editor1:EditType := DateType
var_Editor1:DropDownAlignment := CenterAlignment
var_Editor2 := var_Items:[CellEditor,var_Items:AddItem(SToD("20010101")),0]
var_Editor2:EditType := DateType
var_Editor2:DropDownAlignment := LeftAlignment
var_Editor3 := var_Items:[CellEditor,var_Items:AddItem(SToD("20010101")),0]
var_Editor3:EditType := DateType
var_Editor3:DropDownAlignment := 0x20 |
var_Editor4 := var_Items:[CellEditor,var_Items:AddItem(SToD("20010101")),0]
var_Editor4:EditType := DateType
var_Editor4:DropDownAlignment := 0x20 | CenterAlignment
var_Editor5 := var_Items:[CellEditor,var_Items:AddItem(SToD("20010101")),0]
var_Editor5:EditType := DateType
var_Editor5:DropDownAlignment := 0x20 | RightAlignment
|
848
|
How can I align the drop down portion rather the inside captions

local var_Editor,var_Editor1 as IEditor
local var_Items as IItems
IColumn{oDCOCX_Exontrol1:Columns:Add("DropDown")}:Editor:EditType := DateType
var_Items := oDCOCX_Exontrol1:Items
var_Editor := var_Items:[CellEditor,var_Items:AddItem(SToD("20010101")),0]
var_Editor:EditType := DateType
var_Editor:DropDownAlignment := 0x20 |
var_Editor1 := var_Items:[CellEditor,var_Items:AddItem(SToD("20010101")),0]
var_Editor1:EditType := DateType
var_Editor1:DropDownAlignment := 0x10 |
var_Items:AddItem(SToD("20010101"))
|
847
|
Is it possible to show a message that the field is empty

local var_Column as IColumn
local var_Editor as IEditor
oDCOCX_Exontrol1:DrawGridLines := exRowLines
oDCOCX_Exontrol1:FullRowSelect := exColumnSel
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Float")}
var_Editor := var_Column:Editor
var_Editor:EditType := MaskType
var_Editor:Mask := ";;;float,digits=0,grouping=,invalid=empty,warning=invalid character"
oDCOCX_Exontrol1:Items:AddItem(192278)
oDCOCX_Exontrol1:Items:AddItem(1000)
|
846
|
How can I mask a date

local var_Editor,var_Editor1,var_Editor2,var_Editor3,var_Editor4,var_Editor5,var_Editor6,var_Editor7,var_Editor8 as IEditor
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:CauseValidateValue := exValidateCell
oDCOCX_Exontrol1:FullRowSelect := exColumnSel
oDCOCX_Exontrol1:DrawGridLines := exRowLines
oDCOCX_Exontrol1:Columns:Add("Date")
oDCOCX_Exontrol1:Columns:Add("Mask")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem(SToD("20010101"))
var_Editor := var_Items:[CellEditor,h,0]
var_Editor:EditType := DateType
var_Editor:Mask := "{1,12}/{1,31}/{1950,2050};1;;select=1,warning=Invalid character!,invalid=Invalid date\, for the input mask <br><b>'<%mask%>'</b>!,validateas=1"
var_Items:[CellValue,h,1] := var_Items:[CellEditor,h,0]:Mask
h := var_Items:AddItem(SToD("20010101"))
var_Editor1 := var_Items:[CellEditor,h,0]
var_Editor1:EditType := DateType
var_Editor1:Mask := "!99/99/9999;1;;empty,validateas=1,invalid=Invalid date\, for the input mask <br><b>'<%mask%>'</b>!,warning=Invalid character!,select=4,overtype"
var_Items:[CellValue,h,1] := var_Items:[CellEditor,h,0]:Mask
h := var_Items:AddItem(SToD("20010101"))
var_Editor2 := var_Items:[CellEditor,h,0]
var_Editor2:EditType := DateType
var_Editor2:Mask := "!99/99/9999;;;empty,validateas=1,invalid=Invalid date\, for the input mask <br><b>'<%mask%>'</b>!,warning=Invalid character!,select=4,overtype"
var_Items:[CellValue,h,1] := var_Items:[CellEditor,h,0]:Mask
h := var_Items:AddItem(SToD("20010101"))
var_Editor3 := var_Items:[CellEditor,h,0]
var_Editor3:EditType := DateType
var_Editor3:Mask := "!99/99/9999;; ;select=4,overtype,empty,warning=Invalid character!,invalid=Invalid date\, for the input mask <br><b>'<%mask%>'</b>!,validateas=1"
var_Items:[CellValue,h,1] := var_Items:[CellEditor,h,0]:Mask
h := var_Items:AddItem(SToD("20010101"))
var_Editor4 := var_Items:[CellEditor,h,0]
var_Editor4:EditType := DateType
var_Editor4:Mask := "![0-9 ][0-9 ]/[0-9 ][0-9 ]/[0-9 ][0-9 ][0-9 ][0-9 ];1;;empty,validateas=1,invalid=Invalid date\, for the input mask <br><b>'<%mask%>'</b>!,warning=Invalid character!,select=4,leading= "
var_Items:[CellValue,h,1] := var_Items:[CellEditor,h,0]:Mask
h := var_Items:AddItem(SToD("20010101"))
var_Items:[FormatCell,h,0] := "len(value) ? shortdateF(value) : ``"
var_Editor5 := var_Items:[CellEditor,h,0]
var_Editor5:EditType := DateType
var_Editor5:Mask := "!99/99/9999;1;;empty,validateas=1,invalid=Invalid date\, for the input mask <br><b>'<%mask%>'</b>!,warning=Invalid character!,select=4,overtype,leading"
var_Items:[CellValue,h,1] := var_Items:[CellEditor,h,0]:Mask
h := var_Items:AddItem(SToD("20010101"))
var_Items:[FormatCell,h,0] := "len(value) ? shortdateF(value) : ``"
var_Editor6 := var_Items:[CellEditor,h,0]
var_Editor6:EditType := DateType
var_Editor6:Mask := "!00/00/0000;1;;empty,validateas=1,invalid=Invalid date\, for the input mask <br><b>'<%mask%>'</b>!,warning=Invalid character!,select=4,overtype,leading"
var_Items:[CellValue,h,1] := var_Items:[CellEditor,h,0]:Mask
h := var_Items:AddItem(SToD("20010101"))
var_Items:[FormatCell,h,0] := "len(value) ? shortdateF(value) : ``"
var_Editor7 := var_Items:[CellEditor,h,0]
var_Editor7:EditType := DateType
var_Editor7:Mask := "!00/00/0000;;0;empty,validateas=1,invalid=Invalid date\, for the input mask <br><b>'<%mask%>'</b>!,warning=Invalid character!,select=4,overtype"
var_Items:[CellValue,h,1] := var_Items:[CellEditor,h,0]:Mask
h := var_Items:AddItem(SToD("20010101"))
var_Items:[FormatCell,h,0] := "len(value) ? shortdateF(value) : ``"
var_Editor8 := var_Items:[CellEditor,h,0]
var_Editor8:EditType := DateType
var_Editor8:Mask := "!00/00/0000;;;empty,validateas=1,invalid=Invalid date\, for the input mask <br><b>'<%mask%>'</b>!,warning=Invalid character!,select=1,overtype"
var_Items:[CellValue,h,1] := var_Items:[CellEditor,h,0]:Mask
oDCOCX_Exontrol1:EndUpdate()
|
845
|
How can I display and edit an integer number to show grouping digits too ( no decimals)

local var_Column as IColumn
local var_Editor as IEditor
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Float")}
var_Column:FormatColumn := "value format `0`"
var_Editor := var_Column:Editor
var_Editor:EditType := MaskType
var_Editor:Mask := ";;;float,digits=0"
oDCOCX_Exontrol1:Items:AddItem(192278)
|
844
|
How can I display and edit a float number to show grouping digits too

local var_Column as IColumn
local var_Editor as IEditor
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Float")}
var_Column:FormatColumn := "value format ``"
var_Editor := var_Column:Editor
var_Editor:EditType := MaskType
var_Editor:Mask := ";;;float"
oDCOCX_Exontrol1:Items:AddItem(192278)
|
843
|
How can I mask a phone number

local var_Editor,var_Editor1,var_Editor2,var_Editor3 as IEditor
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:CauseValidateValue := exValidateCell
oDCOCX_Exontrol1:DrawGridLines := exRowLines
oDCOCX_Exontrol1:FullRowSelect := exColumnSel
IColumn{oDCOCX_Exontrol1:Columns:Add("Phone")}:Editor:EditType := MaskType
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem(nil)
var_Editor := var_Items:[CellEditor,h,0]
var_Editor:EditType := MaskType
var_Editor:Mask := "!(999) 000 0000;1;;select=1,empty,overtype,warning=invalid characer,invalid=The value you entered isn't appropriate for the input mask <b>'<%mask%>'</b> specified for this field."
h := var_Items:AddItem("0123")
var_Editor1 := var_Items:[CellEditor,h,0]
var_Editor1:EditType := MaskType
var_Editor1:Mask := "!(999) 000 0000;2;;select=4"
h := var_Items:AddItem("0123")
var_Editor2 := var_Items:[CellEditor,h,0]
var_Editor2:EditType := MaskType
var_Editor2:Mask := "`Phone: `!(999) 000-0000"
h := var_Items:AddItem("(074) 876-1222")
var_Editor3 := var_Items:[CellEditor,h,0]
var_Editor3:EditType := MaskType
var_Editor3:Mask := "!(999) 000-0000;0"
|
842
|
Is it possible to display the ColorType fields using RGB format

local var_Editor,var_Editor1,var_Editor2,var_Editor3,var_Editor4,var_Editor5,var_Editor6 as IEditor
local var_Items as IItems
local h as USUAL
IColumn{oDCOCX_Exontrol1:Columns:Add("Color")}:Editor:EditType := ColorType
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(255)
h := var_Items:AddItem(255)
var_Editor := var_Items:[CellEditor,h,0]
var_Editor:EditType := ColorType
var_Editor:Mask := "`RGB(`{0,255}\,{0,255}\,{0,255}`)`;;0"
h := var_Items:AddItem(255)
var_Editor1 := var_Items:[CellEditor,h,0]
var_Editor1:EditType := ColorType
var_Editor1:Mask := "`&H`XXXXXXXX`&`;;0;overtype,insertype,warning=Wrong!"
h := var_Items:AddItem(255)
var_Editor2 := var_Items:[CellEditor,h,0]
var_Editor2:EditType := ColorType
var_Editor2:Mask := "`0x`XX `0x`XX `0x`XX;;0;overtype,insertype,warning=Wrong!"
h := var_Items:AddItem(255)
var_Editor3 := var_Items:[CellEditor,h,0]
var_Editor3:EditType := ColorType
var_Editor3:Mask := "R{0,255} G{0,255} B{0,255};;0;overtype,insertype,warning=Wrong!"
h := var_Items:AddItem(255)
var_Editor4 := var_Items:[CellEditor,h,0]
var_Editor4:EditType := ColorType
var_Editor4:Mask := "`(hexa) RGB 0x`XXXXXX;;0;overtype,insertype,warning=Wrong!"
h := var_Items:AddItem(255)
var_Editor5 := var_Items:[CellEditor,h,0]
var_Editor5:EditType := ColorType
var_Editor5:Mask := "`(decimal) Red: `{0,255}` Green: `{0,255}` Blue: `{0,255};;0;overtype,insertype,warning=Wrong!"
h := var_Items:AddItem(255)
var_Editor6 := var_Items:[CellEditor,h,0]
var_Editor6:EditType := ColorType
var_Editor6:Mask := "`(combine) Red: `{0,255}` Green: 0x`XX` Blue: `{0,255};;0;overtype,insertype,warning=Wrong!"
|
841
|
How can I add the ExComboBox as an user editor

METHOD OCX_Exontrol1UserEditorClose(Object,Item,ColIndex) CLASS MainDialog
// UserEditorClose event - Fired the user editor is about to be opened.
// Items.CellValue(Item,ColIndex) = Object.Value
RETURN NIL
METHOD OCX_Exontrol1UserEditorOleEvent(Object,Ev,CloseEditor,Item,ColIndex) CLASS MainDialog
// UserEditorOleEvent event - Occurs when an user editor fires an event.
OutputDebugString(String2Psz( AsString(Ev) ))
RETURN NIL
METHOD OCX_Exontrol1UserEditorOpen(Object,Item,ColIndex) CLASS MainDialog
// UserEditorOpen event - Occurs when an user editor is about to be opened.
// Object.Value = Me.Items.CellValue(Item,ColIndex)
RETURN NIL
local var_ComboBox as IComboBox
local var_Editor as IEditor
local var_Items as IItems
local rs as _Recordset
oDCOCX_Exontrol1:BeginUpdate()
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("Exontrol.ComboBox")}:Editor
var_Editor:EditType := UserEditorType
var_Editor:UserEditor("Exontrol.ComboBox","")
// Generate Source for 'ExComboBox 1.0 Control Library(ExComboBox.dll)' server from Tools\Automation Server...
var_ComboBox := IComboBox{var_Editor:UserEditorObject}
var_ComboBox:BeginUpdate()
var_ComboBox:Style := 2
var_ComboBox:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
var_ComboBox:DataSource := _Recordset{rs}
var_ComboBox:MinHeightList := 128
var_ComboBox:SearchColumnIndex := 0
var_ComboBox:UseTabKey := false
var_ComboBox:EndUpdate()
oDCOCX_Exontrol1:DrawGridLines := exRowLines
oDCOCX_Exontrol1:DefaultItemHeight := 21
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellEditorVisible,var_Items:AddItem(10248),0] := exEditorVisible
var_Items:[CellEditorVisible,var_Items:AddItem(10249),0] := exEditorVisible
var_Items:[CellEditorVisible,var_Items:AddItem(10250),0] := exEditorVisible
oDCOCX_Exontrol1:EndUpdate()
|
840
|
How can I add a header row

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:ShowLockedItems := true
oDCOCX_Exontrol1:DrawGridLines := exVLines
oDCOCX_Exontrol1:Columns:Add("C1")
oDCOCX_Exontrol1:Columns:Add("C2")
var_Items := oDCOCX_Exontrol1:Items
var_Items:[LockedItemCount,exTop] := 1
h := var_Items:[LockedItem,exTop,0]
var_Items:[ItemBackColor,h] := RGB(128,128,128)
var_Items:[ItemForeColor,h] := RGB(255,255,255)
var_Items:[CellValue,h,0] := "footer c1"
var_Items:[CellValue,h,1] := "footer c2"
var_Items:[CellValue,var_Items:AddItem("cell"),1] := "cell"
|
839
|
How can I add a footer row

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:ShowLockedItems := true
oDCOCX_Exontrol1:DrawGridLines := exVLines
oDCOCX_Exontrol1:Columns:Add("C1")
oDCOCX_Exontrol1:Columns:Add("C2")
var_Items := oDCOCX_Exontrol1:Items
var_Items:[LockedItemCount,exBottom] := 1
h := var_Items:[LockedItem,exBottom,0]
var_Items:[ItemBackColor,h] := RGB(128,128,128)
var_Items:[ItemForeColor,h] := RGB(255,255,255)
var_Items:[CellValue,h,0] := "footer c1"
var_Items:[CellValue,h,1] := "footer c2"
var_Items:[CellValue,var_Items:AddItem("cell"),1] := "cell"
|
838
|
How can I programmatically add more columns to the sort bar and other to be sorted, but not included in the sort bar

local var_Columns as IColumns
oDCOCX_Exontrol1:SortBarVisible := true
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add(AsString(0))
var_Columns:Add(AsString(1))
var_Columns:Add(AsString(2))
var_Columns:Add(AsString(3))
var_Columns:Add(AsString(4))
oDCOCX_Exontrol1:Layout := "multiplesort=" + CHR(34) + "C3:1 C4:2" + CHR(34) + ";singlesort=" + CHR(34) + "C2:1" + CHR(34) + ""
|
837
|
How can I fix a column, while other sizable and fill the control's client

local var_Column as IColumn
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:Columns:Add("Sizable")
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("F")}
var_Column:AllowSizing := false
var_Column:Width := 16
|
836
|
Is it possible to use empty values on a PickEditType editor (method 2)

local var_Editor as IEditor
local var_Items as IItems
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("DropDown")}:Editor
var_Editor:EditType := PickEditType
var_Editor:AddItem(0,"",nil)
var_Editor:AddItem(1,"The first item",nil)
var_Editor:AddItem(2,"The second item",nil)
var_Editor:AddItem(3,"The third item",nil)
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("The first item")
var_Items:AddItem("")
var_Items:AddItem("The third item")
|
835
|
Is it possible to use empty values on a PickEditType editor (method 1)

local var_Editor as IEditor
local var_Items as IItems
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("DropDown")}:Editor
var_Editor:EditType := PickEditType
var_Editor:[Option,exPickAllowEmpty] := true
var_Editor:AddItem(1,"The first item",nil)
var_Editor:AddItem(2,"The second item",nil)
var_Editor:AddItem(3,"The third item",nil)
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("The first item")
var_Items:AddItem("")
var_Items:AddItem("The third item")
|
834
|
How can I specify an unselectable cell

local var_Columns as IColumns
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("C1")
var_Columns:Add("C2")
var_Columns:Add("C3")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("unselectable item")
var_Items:[CellValue,h,1] := "unselectable item"
var_Items:[CellValue,h,2] := "unselectable item"
var_Items:[SelectableItem,h] := false
h := var_Items:AddItem("selectable cell")
var_Items:[CellValue,h,1] := "unselectable cell"
var_Items:[CellEnabled,h,1] := false
var_Items:[CellForeColor,h,1] := RGB(0,0,0)
var_Items:[CellValue,h,2] := "disabled cell"
var_Items:[CellEnabled,h,2] := false
h := var_Items:AddItem("disabled item")
var_Items:[CellValue,h,1] := "disabled item"
var_Items:[CellValue,h,2] := "disabled item"
var_Items:[EnableItem,h] := false
var_Items:[SelectableItem,h] := false
oDCOCX_Exontrol1:EndUpdate()
|
833
|
Is it possible to edit a float number without using of e/E/d/D (exponent) and +/- (signs) characters

local var_Editor as IEditor
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("Edit")}:Editor
var_Editor:EditType := EditType
var_Editor:Numeric := exDisableSigns | exFloatInteger
oDCOCX_Exontrol1:Items:AddItem(1.22)
|
832
|
How can I edit a float number with no using of e/E/d/D and + character

local var_Editor as IEditor
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("Edit")}:Editor
var_Editor:EditType := EditType
var_Editor:Numeric := exDisablePlus | exFloatInteger
oDCOCX_Exontrol1:Items:AddItem(1.22)
|
831
|
Is it possible to edit a float number with no using of e/E/d/D (exponent) characters

local var_Editor as IEditor
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("Edit")}:Editor
var_Editor:EditType := EditType
var_Editor:Numeric := exFloatInteger
oDCOCX_Exontrol1:Items:AddItem(1.22)
|
830
|
How can I edit an integer with no using of +/- signs

local var_Editor as IEditor
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("Edit")}:Editor
var_Editor:EditType := EditType
var_Editor:Numeric := 0xfc | exDisableSigns | exFloatInteger | exFloat
oDCOCX_Exontrol1:Items:AddItem(1)
|
829
|
When I'm trying to show string with "line break" character (vbCrLF) in a textbox, it shows 2 squares. Is there any way to hide these squares

local var_Column,var_Column1,var_Column2 as IColumn
local var_Columns as IColumns
local var_Items as IItems
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Value")
var_Column := IColumn{var_Columns:Add("CellSingleLine = False")}
var_Column:ComputedField := "%0"
var_Column:[Def,exCellSingleLine] := false
var_Column1 := IColumn{var_Columns:Add("FormatColumn/replace CRLF")}
var_Column1:ComputedField := "%0"
var_Column1:FormatColumn := "value replace `\r\n` with ``"
var_Column2 := IColumn{var_Columns:Add("FormatColumn/replace TAB,CRLF")}
var_Column2:ComputedField := "%0"
var_Column2:FormatColumn := "(value replace `\t` with ``) replace `\r\n` with ``"
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("a\ta\r\nb\tb")
|
828
|
Is there any way to "unselect" radio group

METHOD OCX_Exontrol1DblClick(Shift,X,Y) CLASS MainDialog
// DblClick event - Occurs when the user dblclk the left mouse button over an object.
local var_Items as IItems
local h as USUAL
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:[CellChecked,1234]
var_Items:[CellHasCheckBox,0,h] := true
var_Items:[CellState,0,h] := 0
var_Items:[CellHasCheckBox,0,h] := false
RETURN NIL
METHOD OCX_Exontrol1SelectionChanged() CLASS MainDialog
// SelectionChanged event - Fired after a new item has been selected.
local var_Items as IItems
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellState,var_Items:FocusItem,0] := 1
RETURN NIL
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SelBackColor := RGB(255,255,128)
oDCOCX_Exontrol1:SelForeColor := RGB(0,0,0)
oDCOCX_Exontrol1:Columns:Add("Default")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Radio 1")
var_Items:[CellHasRadioButton,h,0] := true
var_Items:[CellRadioGroup,h,0] := 1234
h := var_Items:AddItem("Radio 2")
var_Items:[CellHasRadioButton,h,0] := true
var_Items:[CellRadioGroup,h,0] := 1234
var_Items:[CellState,h,0] := 1
h := var_Items:AddItem("Radio 3")
var_Items:[CellHasRadioButton,h,0] := true
var_Items:[CellRadioGroup,h,0] := 1234
|
827
|
The Column.Alignment property does not seem to work for cells with images in them. What can be done

local var_Column as IColumn
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oDCOCX_Exontrol1:TreeColumnIndex := -1
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:HeaderHeight := 24
oDCOCX_Exontrol1:DefaultItemHeight := 24
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Image")}
var_Column:AllowSizing := false
var_Column:Width := 32
var_Column:HTMLCaption := "<img>1</img>"
var_Column:HeaderAlignment := CenterAlignment
var_Column:Alignment := CenterAlignment
var_Column:[Def,exCellValueFormat] := 1
oDCOCX_Exontrol1:Columns:Add("Rest")
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("<img>1</img>")
var_Items:AddItem("<img>2</img>")
var_Items:AddItem("<img>3</img>")
oDCOCX_Exontrol1:EndUpdate()
|
826
|
Can I change the format of date to be shown in the control

local var_Column,var_Column1,var_Column2 as IColumn
local var_Columns as IColumns
local var_Items as IItems
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Default")
var_Column := IColumn{var_Columns:Add("Format.1")}
var_Column:ComputedField := "%0"
var_Column:FormatColumn := "dateF(value) replace `/` with `-`"
var_Column1 := IColumn{var_Columns:Add("Format.2")}
var_Column1:ComputedField := "%0"
var_Column1:[Def,exCellValueFormat] := 1
var_Column1:FormatColumn := "`<b>`+ shortdate(value) + `</b> ` + timeF(value)"
var_Column2 := IColumn{var_Columns:Add("Format.3")}
var_Column2:ComputedField := "%0"
var_Column2:[Def,exCellValueFormat] := 1
var_Column2:FormatColumn := "( dateF(value) replace `/` with `-` ) + ` <b>`+ ( weekday(value) case ( 0 : `Su`; 1 : `Mo`; 2 : `Tu`; 3 : `We`; 4 : `Th`; 5 : `Fr`; 6 : `Sa`) )"
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(SToD("20010101 10:00:00"))
var_Items:AddItem(SToD("20010102 10:00:00"))
|
825
|
How do I arrange my columns on multiple levels

local var_Column,var_Column1,var_Column2 as IColumn
local var_Columns as IColumns
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:DrawGridLines := exAllLines
var_Columns := oDCOCX_Exontrol1:Columns
var_Column := IColumn{var_Columns:Add("C0")}
var_Column:ExpandColumns := "1,2"
var_Column:DisplayExpandButton := false
var_Columns:Add("C1")
var_Columns:Add("C2")
var_Columns:Add("C3")
var_Column1 := IColumn{var_Columns:Add("C4")}
var_Column1:ExpandColumns := "5,6"
var_Column1:DisplayExpandButton := false
var_Columns:Add("C5")
var_Column2 := IColumn{var_Columns:Add("C6")}
var_Column2:ExpandColumns := "6,7"
var_Column2:DisplayExpandButton := false
var_Columns:Add("C7")
oDCOCX_Exontrol1:EndUpdate()
|
824
|
Does your control support expandable header or columns, so I can arrange it on multiple levels

local var_Column,var_Column1 as IColumn
local var_Columns as IColumns
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:BackColorLevelHeader := RGB(240,240,240)
var_Columns := oDCOCX_Exontrol1:Columns
var_Column := IColumn{var_Columns:Add("Photo")}
var_Column:AllowSizing := false
var_Column:Width := 32
var_Columns:Add("Personal Info")
var_Columns:Add("Title")
var_Columns:Add("Name")
var_Columns:Add("First")
var_Columns:Add("Last")
var_Columns:Add("Address")
var_Columns:[Item,"Personal Info"]:ExpandColumns := "2,3"
var_Column1 := var_Columns:[Item,"Name"]
var_Column1:ExpandColumns := "4,5"
var_Column1:Expanded := false
oDCOCX_Exontrol1:EndUpdate()
|
823
|
How can I use the MinWidthAutoResize/MaxWidthAutoResize

local var_Column as IColumn
local rs as _Recordset
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
var_Column := oDCOCX_Exontrol1:Columns:[Item,0]
var_Column:MaxWidthAutoResize := 32
var_Column:WidthAutoResize := true
oDCOCX_Exontrol1:EndUpdate()
|
822
|
Does your control support subscript or superscript, in HTML captions

local var_Column,var_Column1,var_Column2 as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:HeaderHeight := 28
oDCOCX_Exontrol1:DefaultItemHeight := 24
var_Columns := oDCOCX_Exontrol1:Columns
var_Column := IColumn{var_Columns:Add("Column 1")}
var_Column:HTMLCaption := "Column <b><off 2><font ;6>1"
var_Column:[Def,exCellValueFormat] := 1
var_Column1 := IColumn{var_Columns:Add("Column 2")}
var_Column1:HTMLCaption := "Column <b><off 2><font ;6>2"
var_Column1:[Def,exCellValueFormat] := 1
var_Column2 := IColumn{var_Columns:Add("Column 3")}
var_Column2:HTMLCaption := "Column <b><off 2><font ;6>3"
var_Column2:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Item <font ;6><off 4>1")
var_Items:[CellValue,h,1] := "Item <font ;6><off -6>2"
var_Items:[CellValue,h,2] := "Item <b><font ;6><off -6>2<off 4>3<off 4>1"
|
821
|
How can I specify the splited cell's background color

local var_Column as IColumn
local var_Items as IItems
local h,var_SplitCell as USUAL
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:TreeColumnIndex := -1
IColumn{oDCOCX_Exontrol1:Columns:Add("1")}:[Def,exCellBackColor] := 255
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("2")}
var_Column:Width := 32
var_Column:AllowSizing := false
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("The Item's background color inherits the Column.Def(exCellBackColor)")
var_Items:[ItemDivider,h] := 0
h := var_Items:AddItem("The Item's background color inherits the CellBackColor()")
var_Items:[ItemDivider,h] := 0
var_Items:[CellBackColor,h,nil] := RGB(0,255,0)
h := var_Items:AddItem("The Item's background color inherits the CellBackColor(), while the split inherits from the Column.Def(exCellBackColor) ")
var_Items:[ItemDivider,h] := 0
var_Items:[CellBackColor,h,nil] := RGB(0,255,0)
var_SplitCell := var_Items:[SplitCell,h,0]
h := var_Items:AddItem("The Item's background color inherits the CellBackColor()")
var_Items:[ItemDivider,h] := 0
var_Items:[CellBackColor,h,nil] := RGB(0,255,0)
var_Items:[CellBackColor,0,var_Items:[SplitCell,h,0]] := RGB(0,0,255)
|
820
|
How can I specify a fixed width for a column

local var_Column,var_Column1 as IColumn
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:TreeColumnIndex := -1
oDCOCX_Exontrol1:ColumnAutoResize := false
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("C1")}
var_Column:Width := 17
var_Column:AllowSizing := false
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("C2")}
var_Column1:Width := 17
var_Column1:AllowSizing := false
oDCOCX_Exontrol1:Columns:Add("Other")
oDCOCX_Exontrol1:ColumnAutoResize := true
|
819
|
How can I split a cell in three parts

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:Columns:Add("Default")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("entire")
h := var_Items:AddItem("split 1")
h := var_Items:[SplitCell,h,0]
var_Items:[CellValue,0,h] := "split 2"
h := var_Items:[SplitCell,0,h]
var_Items:[CellValue,0,h] := "split 3"
h := var_Items:AddItem("entire")
oDCOCX_Exontrol1:EndUpdate()
|
818
|
How can I find if there is any filter applied to the control

METHOD OCX_Exontrol1FilterChange() CLASS MainDialog
// FilterChange event - Occurs when filter was changed.
OutputDebugString(String2Psz( "If negative, the filter is present, else not" ))
OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:Items:VisibleItemCount) ))
RETURN NIL
local var_Column as IColumn
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:TreeColumnIndex := -1
oDCOCX_Exontrol1:FilterInclude := exMatchingItemsOnly
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Column")}
var_Column:DisplayFilterButton := true
var_Column:FilterType := exFilter
var_Column:Filter := "C1"
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("R1")
var_Items:InsertItem(h,nil,"C1")
var_Items:InsertItem(h,nil,"C2")
var_Items:[ExpandItem,h] := true
h := var_Items:AddItem("R2")
var_Items:InsertItem(h,nil,"C1")
var_Items:InsertItem(h,nil,"C2")
oDCOCX_Exontrol1:ApplyFilter()
oDCOCX_Exontrol1:EndUpdate()
|
817
|
How can I prevent showing the lines for the hierarchy while using the exMatchingItemsOnly option

local var_Column as IColumn
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:TreeColumnIndex := -1
oDCOCX_Exontrol1:FilterInclude := exMatchingItemsOnly
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Column")}
var_Column:DisplayFilterButton := true
var_Column:FilterType := exFilter
var_Column:Filter := "C1|C2"
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("R1")
var_Items:InsertItem(h,nil,"C1")
var_Items:InsertItem(h,nil,"C2")
var_Items:[ExpandItem,h] := true
h := var_Items:AddItem("R2")
var_Items:InsertItem(h,nil,"C1")
var_Items:InsertItem(h,nil,"C2")
oDCOCX_Exontrol1:ApplyFilter()
oDCOCX_Exontrol1:EndUpdate()
|
816
|
Is there any method to get only the matched items and not the items with his parent

local var_Column as IColumn
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:FilterInclude := exMatchingItemsOnly
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Column")}
var_Column:DisplayFilterButton := true
var_Column:FilterType := exFilter
var_Column:Filter := "C1|C2"
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("R1")
var_Items:InsertItem(h,nil,"C1")
var_Items:InsertItem(h,nil,"C2")
var_Items:[ExpandItem,h] := true
h := var_Items:AddItem("R2")
var_Items:InsertItem(h,nil,"C1")
var_Items:InsertItem(h,nil,"C2")
oDCOCX_Exontrol1:ApplyFilter()
oDCOCX_Exontrol1:EndUpdate()
|
815
|
Is there any property I can save and restore automatically the current setting, column position, size, and so on (2)

local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Column")
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("Item 1")
var_Items:AddItem("Item 2")
var_Items:AddItem("Item 3")
oDCOCX_Exontrol1:Layout := "Select=" + CHR(34) + "0" + CHR(34) + ";SingleSort=" + CHR(34) + "C0:2" + CHR(34) + ";Columns=1"
oDCOCX_Exontrol1:EndUpdate()
|
814
|
Is there any property I can save and restore automatically the current setting, column position, size, and so on (1)

local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Column")
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("Item 1")
var_Items:AddItem("Item 2")
var_Items:AddItem("Item 3")
oDCOCX_Exontrol1:Layout := "gBjAAwAAuABmABpABsAB0ABlAByhoAPIAOEPAA9gYABoABQAgUEg0XN4AOcJicKkpujMbjsfkMFk0YhkQgUOjUEl8gjcGO0ok8KMULjEaGMcj08kQAO8oMkTNEtGwAGQAqc7gUlhh1ABtAEsk9GpEfhElgVcsMupNlnlonlaAFcr0shUsp8QPEtnVJqJhmcIhUMh0QiU5sYAqMngUSuEMw07k8Qv0SgVRrNEuVflF2jF5x9JyNEm0TjQijemyE0jE3t+YruauoAu4Az1qj9BzRn0UzksSnAA0xDjY6qnAw8OiUQ0dwzN0zWz2t7j8/xURAGNvWH6k8xlEhklhEI0O/6QAgI="
oDCOCX_Exontrol1:EndUpdate()
|
813
|
I have noticed that the column's header is changed once the cursor hovers it. Is it possible to change that visual appearance

local var_Columns as IColumns
oDCOCX_Exontrol1:VisualAppearance:Add(1,"c:\exontrol\images\normal.ebn")
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Column 1")
var_Columns:Add("Column 2")
oDCOCX_Exontrol1:BackColorHeader := 0x1000000
oDCOCX_Exontrol1:[Background,exCursorHoverColumn] := 0x12d86ff
|
812
|
Is it possible to change the visual appearance of the columns selector/floating bar(3)

local var_Columns as IColumns
oDCOCX_Exontrol1:ColumnAutoResize := false
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Column 1")
IColumn{var_Columns:Add("Column 2")}:Visible := false
oDCOCX_Exontrol1:VisualAppearance:Add(2,"c:\exontrol\images\normal.ebn")
oDCOCX_Exontrol1:VisualAppearance:Add(3,"c:\exontrol\images\pushed.ebn")
oDCOCX_Exontrol1:[Background,exColumnsFloatAppearance] := 0x2000000
oDCOCX_Exontrol1:[Background,exColumnsFloatBackColor] := 0x3000000
oDCOCX_Exontrol1:[Background,exColumnsFloatCaptionBackColor] := RGB(246,245,240)
oDCOCX_Exontrol1:ColumnsFloatBarVisible := exColumnsFloatBarVisibleIncludeHiddenColumns
|
811
|
Is it possible to change the visual appearance of the columns selector/floating bar(2)

local var_Columns as IColumns
oDCOCX_Exontrol1:ColumnAutoResize := false
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Column 1")
IColumn{var_Columns:Add("Column 2")}:Visible := false
oDCOCX_Exontrol1:VisualAppearance:Add(3,"c:\exontrol\images\pushed.ebn")
oDCOCX_Exontrol1:[Background,exColumnsFloatBackColor] := 0x3000000
oDCOCX_Exontrol1:ColumnsFloatBarVisible := exColumnsFloatBarVisibleIncludeHiddenColumns
|
810
|
Is it possible to change the visual appearance of the columns selector/floating bar(1)

oDCOCX_Exontrol1:VisualAppearance:Add(2,"c:\exontrol\images\normal.ebn")
oDCOCX_Exontrol1:[Background,exColumnsFloatAppearance] := 0x2000000
oDCOCX_Exontrol1:[Background,exColumnsFloatBackColor] := RGB(246,245,240)
oDCOCX_Exontrol1:[Background,exColumnsFloatCaptionBackColor] := RGB(246,245,240)
oDCOCX_Exontrol1:ColumnsFloatBarVisible := exColumnsFloatBarVisibleIncludeHiddenColumns
|
809
|
I am using the ColumnsFloatBarVisible property on True, but still not able to add any column on that list

local var_Columns as IColumns
oDCOCX_Exontrol1:ColumnAutoResize := false
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Column 1")
IColumn{var_Columns:Add("Column 2")}:Visible := false
oDCOCX_Exontrol1:ColumnsFloatBarVisible := exColumnsFloatBarVisibleIncludeHiddenColumns
|
808
|
Is it possible to list a column to columns selector/floating bar, but still user can use it

local var_Column as IColumn
local var_Columns as IColumns
oDCOCX_Exontrol1:ColumnAutoResize := false
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Column 1")
IColumn{var_Columns:Add("Column 2")}:Visible := false
var_Column := IColumn{var_Columns:Add("Column 3")}
var_Column:Visible := false
var_Column:Enabled := false
oDCOCX_Exontrol1:ColumnsFloatBarVisible := exColumnsFloatBarVisibleIncludeHiddenColumns
|
807
|
How can I prevent a specific column not to be listed in the columns selector/floating bar

local var_Column as IColumn
local var_Columns as IColumns
oDCOCX_Exontrol1:ColumnAutoResize := false
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Column 1")
IColumn{var_Columns:Add("Column 2")}:Visible := false
var_Column := IColumn{var_Columns:Add("Column 3")}
var_Column:Visible := false
var_Column:AllowDragging := false
oDCOCX_Exontrol1:ColumnsFloatBarVisible := exColumnsFloatBarVisibleIncludeHiddenColumns
|
806
|
Is it possible to change the "Columns" caption being shown in the columns selector/floating bar

local var_Columns as IColumns
oDCOCX_Exontrol1:ColumnAutoResize := false
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Column 1")
IColumn{var_Columns:Add("Column 2")}:Visible := false
oDCOCX_Exontrol1:[Description,exColumnsFloatBar] := "Hidden Columns"
oDCOCX_Exontrol1:ColumnsFloatBarVisible := exColumnsFloatBarVisibleIncludeHiddenColumns
|
805
|
How can I show the columns selector, so the user can drag and drop columns to the view

local var_Columns as IColumns
oDCOCX_Exontrol1:ColumnAutoResize := false
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Column 1")
IColumn{var_Columns:Add("Column 2")}:Visible := false
oDCOCX_Exontrol1:ColumnsFloatBarVisible := exColumnsFloatBarVisibleIncludeHiddenColumns
|
804
|
The column's header is changed while the cursor hovers it. Is it possible to prevent that

local var_Columns as IColumns
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Column 1")
var_Columns:Add("Column 2")
oDCOCX_Exontrol1:[Background,exCursorHoverColumn] := -1
|
803
|
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 2)

local rs as _Recordset
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:SortBarVisible := true
oDCOCX_Exontrol1:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
oDCOCX_Exontrol1:AllowGroupBy := true
oDCOCX_Exontrol1:Columns:[Item,1]:SortOrder := SortAscending
oDCOCX_Exontrol1:EndUpdate()
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:EnsureVisibleColumn(0)
oDCOCX_Exontrol1:Items:[ExpandItem,0] := false
oDCOCX_Exontrol1:EndUpdate()
|
802
|
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 1)

METHOD OCX_Exontrol1AddGroupItem(Item) CLASS MainDialog
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
oDCOCX_Exontrol1:Items:[ExpandItem,Item] := false
RETURN NIL
local rs as _Recordset
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:SortBarVisible := true
oDCOCX_Exontrol1:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
oDCOCX_Exontrol1:AllowGroupBy := true
oDCOCX_Exontrol1:Columns:[Item,1]:SortOrder := SortAscending
oDCOCX_Exontrol1:EndUpdate()
|
801
|
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)

local var_Items as IItems
local rs as _Recordset
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:SortBarVisible := true
oDCOCX_Exontrol1:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
oDCOCX_Exontrol1:AllowGroupBy := true
oDCOCX_Exontrol1:Columns:[Item,1]:SortOrder := SortAscending
oDCOCX_Exontrol1:EndUpdate()
oDCOCX_Exontrol1:EnsureVisibleColumn(0)
oDCOCX_Exontrol1:BeginUpdate()
var_Items := oDCOCX_Exontrol1:Items
var_Items:[ExpandItem,var_Items:[RootItem,0]] := false
var_Items:[ExpandItem,var_Items:[RootItem,1]] := false
var_Items:[ExpandItem,var_Items:[RootItem,2]] := false
oDCOCX_Exontrol1:EndUpdate()
|